package com.tough.engine;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class GmMain extends MIDlet {

	private GmCanvas canvas; 
	private Display display;
	private Thread thread;
	public static GmMain instance;
	
	public GmMain() {
		canvas = new GmCanvas();
		thread = new Thread(canvas);
		display = Display.getDisplay(this);
		instance = this;
	}

	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
	}

	protected void pauseApp() {
	}

	protected void startApp() throws MIDletStateChangeException {
		display.setCurrent(canvas);
		thread.start();
	}
}
